package com.knowledge.plus.设计模式.模板模式;

/**
 * 模板模式
 *
 * @author aFei
 * @since 2022/3/26
 */
public abstract class Template {
    private String title = "我是标题";
    private String oneLow = "第一行";
    private String lastLow = "最后一行";

    public void write() {
        System.out.println(title);
        System.out.println(oneLow);
        System.out.println(writeContent());
        System.out.println(lastLow);
    }

    public abstract String writeContent();

}
